<template>
	<div class="swipe">
		<van-swipe :autoplay="3000" lazy-render indicator-color="white">
			<van-swipe-item v-for="item in list" :key="item">
				<img :src="item.img" />
			</van-swipe-item>
		</van-swipe>
	</div>
</template>

<script setup lang='ts'>
import { Swipe } from '@/api/loginapi';
import { ref,onMounted,type Ref } from 'vue';

const list:any = ref([])

onMounted(() => {
	Swipe({id:123}).then((res:any) => {
		console.log(res);
		if(res.code==200){
			list.value=res.data
		}
		
	})
})
	


</script>

<style scoped>
.swipe{
	padding: 20px 20px;
	box-sizing: border-box;
}
.van-swipe{
	width: 335px;
	margin: 0 auto;
}
.van-swipe img{
	width: 100%;
}

.van-swipe{
	border-radius: 8px 8px 12px 12px;
}
</style>